package com.seamtop.cuber.common.metadata;


import com.seamtop.cuber.common.entriy.JoinRelationShip;

import java.util.HashMap;
import java.util.List;

/**
 * Created by feng on 2015/8/10.
 */
public class TableMetaData {

    /**
     * 表ID
     */
    private String tableId;

    /**
     * 表名
     */
    private String tableName;

    /**
     * 表前缀（表记录前缀）
     */
    private String tablePrefix;

    /**
     * 是否为虚拟表
     */
    private boolean isVirtualTable = false;

    /**
     * 是否为自定义计数器表
     */
    private boolean isCustomCounterTable = false;

    /**
     * 是否为结果存放表
     */
    private boolean isResultTable = false;

    /**
     * 原表名称
     */
    private String primaryTableName;

    /**
     * 主键信息
     */
    private RowKey rowKey;

    /**
     * 列族以及列族对应的列
     */
    private HashMap<String,Column> columnMap;

    /**
     * 字段关联关系
     */
    private List<JoinRelationShip> joinRelationShipList;

    public String getTableId() {
        return tableId;
    }

    public void setTableId(String tableId) {
        this.tableId = tableId;
    }

    public void setVirtualTable(boolean isVirtualTable) {
        this.isVirtualTable = isVirtualTable;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public RowKey getRowKey() {
        return rowKey;
    }

    public void setRowKey(RowKey rowKey) {
        this.rowKey = rowKey;
    }

    public HashMap<String, Column> getColumnMap() {
        return columnMap;
    }

    public void setColumnMap(HashMap<String, Column> columnMap) {
        this.columnMap = columnMap;
    }

    public boolean isVirtualTable() {
        return isVirtualTable;
    }

    public void setIsVirtualTable(boolean isVirtualTable) {
        this.isVirtualTable = isVirtualTable;
    }

    public String getPrimaryTableName() {
        return primaryTableName;
    }

    public void setPrimaryTableName(String primaryTableName) {
        this.primaryTableName = primaryTableName;
    }

    public List<JoinRelationShip> getJoinRelationShipList() {
        return joinRelationShipList;
    }

    public void setJoinRelationShipList(List<JoinRelationShip> joinRelationShipList) {
        this.joinRelationShipList = joinRelationShipList;
    }

    public String getTablePrefix() {
        return tablePrefix;
    }

    public void setTablePrefix(String tablePrefix) {
        this.tablePrefix = tablePrefix;
    }

    public boolean isCustomCounterTable() {
        return isCustomCounterTable;
    }

    public void setIsCustomCounterTable(boolean isCustomCounterTable) {
        this.isCustomCounterTable = isCustomCounterTable;
    }


    public boolean isResultTable() {
        return isResultTable;
    }

    public void setIsResultTable(boolean isResultTable) {
        this.isResultTable = isResultTable;
    }
}
